package nancal.mp.db.mongo.table

import java.io.*
import nbcp.base.db.*
import nbcp.base.comm.*
import nbcp.base.extend.*
import nbcp.base.enums.*
import nbcp.base.utils.*
import nbcp.myoql.db.*
import nbcp.myoql.db.comm.*
import nbcp.myoql.db.enums.*
import nbcp.myoql.db.mongo.*
import nbcp.myoql.db.mongo.base.*
import nbcp.myoql.db.mongo.component.*
import org.slf4j.LoggerFactory
import org.springframework.stereotype.*



class ApiInstanceIdMeta(private val parentPropertyName: String): MongoColumnName() {
    constructor(value: MongoColumnName) : this(value.toString()) {}
    val id = mongoColumnJoin(this.parentPropertyName, "_id")
    val apiDefine = ApiDefineMeta(mongoColumnJoin(this.parentPropertyName, "apiDefine"))
    /**
     * 参数
     */
    @nbcp.base.db.annotation.Cn(value = """参数""")
    val parameters = KeyValueScriptMeta(mongoColumnJoin(this.parentPropertyName, "parameters"))
    val postBodyScript = mongoColumnJoin(this.parentPropertyName, "postBodyScript")
    val postBody = mongoColumnJoin(this.parentPropertyName, "postBody")
    /**
     * 状态码
     */
    @nbcp.base.db.annotation.Cn(value = """状态码""")
    val status = mongoColumnJoin(this.parentPropertyName, "status")
    /**
     * 响应头
     */
    @nbcp.base.db.annotation.Cn(value = """响应头""")
    val responseHeader = MoerMetaMap(this.parentPropertyName, "responseHeader") /*:map*/
    /**
     * 响应体
     */
    @nbcp.base.db.annotation.Cn(value = """响应体""")
    val responseBody = mongoColumnJoin(this.parentPropertyName, "responseBody")
    val lastExecuteAt = mongoColumnJoin(this.parentPropertyName, "lastExecuteAt")
    /**
     * 备注
     */
    @nbcp.base.db.annotation.Cn(value = """备注""")
    val remark = mongoColumnJoin(this.parentPropertyName, "remark")
    override fun toString(): String {
        return mongoColumnJoin(this.parentPropertyName).toString()
    }
}

